package main
import (
	"fmt"
	// "runtime"
	"time"
)

//switch语法
func main(){
	//-------------------------------------demo1
	// fmt.Print("Go run on ")
	// switch os := runtime.GOOS; os{
	// case "darwin":
	// 	fmt.Println("OS X.")
	// case "linux":
	// 	fmt.Println("Linux.")
	// default:
	// 	fmt.Printf("%s.\n",os)
	// }

	//-------------------------------------demo2
	t := time.Now()
	switch{
	case t.Hour() < 12:
		fmt.Println("Good morning!")
	case t.Hour() < 17:
		fmt.Println("Good afternoon.")
	default:
		fmt.Println("Good evening.")
	}


}